import request from '@/utils/request'
//新增线索,公海,客户信息
export function addCustomer(params){
	return request({
		url: '/product/crm/customer/save',
		method: 'post',
		params:params
	})
}

//更新线索,公海,客户信息
export function updateCustomer(params){
	return request({
		url: '/product/crm/customer/updateClue',
		method: 'post',
		params:params
	})
}

//分页查询线索,公海,客户信息
export function queryCustomerList(params){
	return request({
		url: '/product/crm/customer/querylist',
		method: 'post',
		params:params
	})
}

//分配线索信息
export function distributeMaterial(params){
	return request({
		url: '/product/crm/customer/assignClue',
		method: 'post',
		params:params
	})
}

//批量分配线索信息
export function batchDistributeMaterial(params){
	return request({
		url: '/product/crm/customer/batchAssignClue',
		method: 'post',
		params:params
	})
}

//线索转客户
export function transferCustomer(params){
	return request({
		url: '/product/crm/customer/transferCustomer',
		method: 'post',
		params:params
	})
}

//线索,公海,客户领取线索
export function getMaterial(params){
	return request({
		url: '/product/crm/customer/drawClue',
		method: 'post',
		params:params
	})
}


//公海批量领取线索
export function batchGetMaterial(params){
	return request({
		url: '/product/crm/customer/batchDrawClueGh',
		method: 'post',
		params:params
	})
}

//放弃线索信息
export function giveUpClue(params){
	return request({
		url: '/product/crm/customer/giveupClue',
		method: 'post',
		params:params
	})
}

//线索详情
export function queryCustomerDetail(params){
	return request({
		url: '/product/crm/customer/goEdit',
		method: 'post',
		params:params
	})
}

//导入数据
export function importExcel(data,params){
	return request({
		url: '/product/crm/customer/uploadfile',
		method: 'post',
		data:data,
		params:params
	})
}

//新增渠道时查询渠道列表
export function searchChannelList(params){
	return request({
		url: '/product/crm/rate/queryChannel',
		method: 'post',
		params:params
	})
}

//查询阈值,限制天数信息
export function queryRuleObj(){
	return request({
		url: '/product/crm/conditon/queryCondition',
		method: 'post',
	})
}

//保存或更新阈值,限制天数信息
export function updateRuleObj(params){
	return request({
		url: '/product/crm/conditon/saveConditon',
		method: 'post',
		params:params
	})
}

//查询分配规则
export function queryRuleList(params){
	return request({
		url: '/product/crm/rate/queryRule',
		method: 'post',
		params:params
	})
}

//保存和更新分配规则
export function updateRuleList(params){
	return request({
		url: '/product/crm/rate/saveRule',
		method: 'post',
		params:params
	})
}

//查询渠道或员工列表
//export function queryChannelList(params){
//	return request({
//		url: '/product/crm/rate/queryChannelOrEmployee',
//		method: 'post',
//		params:params
//	})
//}

//跟进
export function saveDeal(params){
	return request({
		url: '/product/crm/follow/saveFollow',
		method: 'post',
		params:params
	})
}

//查询跟进记录
export function queryDealHistory(params){
	return request({
		url: '/product/crm/follow/queryFollow',
		method: 'post',
		params:params
	})
}

//查询分配记录
export function queryDistributeHistory(params){
	return request({
		url: '/product/crm/follow/queryAssign',
		method: 'post',
		params:params
	})
}

//查询配置信息
export function queryConfigList(params){
	return request({
		url: '/product/crm/config/queryConfigList',
		method: 'post',
		params:params
	})
}

//申请退款
export function saveRefund(params){
	return request({
		url: '/product/crm/refund/saveRefund',
		method: 'post',
		params:params
	})
}

//审核退款
export function saveAudit(params){
	return request({
		url: '/product/crm/refund/saveAudit',
		method: 'post',
		params:params
	})
}

//退款申请列表
export function queryRefundList(params){
	return request({
		url: '/product/crm/refund/querylist',
		method: 'post',
		params:params
	})
}
//查看退款审核详情
export function queryAuditDetail(params){
	return request({
		url: '/product/crm/refund/queryDetail',
		method: 'post',
		params:params
	})
}
//查看退款审核记录
export function queryAuditRecord(params){
	return request({
		url: '/product/crm/refund/queryAuditRecord',
		method: 'post',
		params:params
	})
}
//获取待审核数量
export function getWaitAuditCount(){
	return request({
		url: '/product/crm/refund/queryPenddingNum',
		method: 'post',
	})
}
//数据统计列表
export function queryDataStatistics(params){
	return request({
		url: '/product/crm/statistic/list',
		method: 'post',
		params:params
	})
}
//数据统计详情
export function queryDataStatisticsDetail(params){
	return request({
		url: '/product/crm/statistic/detail',
		method: 'post',
		params:params
	})
}
//数据统计列表导出
export function exportList(params){
	return request({
		url: '/product/crm/statistic/exportlist',
		method: 'post',
		params:params,
		responseType: "blob"
	})
}

//数据统计详情导出
export function exportDetail(params){
	return request({
		url: '/product/crm/statistic/exportdetail',
		method: 'post',
		params:params,
		responseType: "blob"
	})
}

//数据统计月度统计
export function queryMonthDataStatistics(params){
	return request({
		url: '/product/crm/statistic/memberMonth',
		method: 'post',
		params:params,
	})
}

//数据统计月度统计详情
export function queryMonthDataStatisticsDetail(params){
	return request({
		url: '/product/crm/statistic/memberMonthDetail',
		method: 'post',
		params:params,
	})
}

//数据统计月度统计导出
export function exportMonthDataStatistics(params){
	return request({
		url: '/product/crm/statistic/memberMonthExport',
		method: 'post',
		params:params,
		responseType: "blob"
	})
}

//数据统计月度统计详情导出
export function exportMonthDetail(params){
	return request({
		url: '/product/crm/statistic/memberMonthDetailExport',
		method: 'post',
		params:params,
		responseType: "blob"
	})
}


//查找树形渠道或员工列表
export function queryChannelList(params){
	return request({
		url: '/product/crm/rate/assignTree',
		method: 'post',
		params:params,
	})
}